<script>
var mei = "கஙசஜஞடணதநனபமயரறலளழவஷஸஹ";
var suffix = "ாிீுூெேைொோௌ்";
var obj = 

{"அ":0,"ஆ":0,"இ":0,"ஈ":0,"உ":0,"ஊ":0,"எ":0,"ஏ":0,"ஐ":0,"ஒ":0,"ஓ":0,"ஔ":0,"க":0,"ங":0,"ச":0,"ஜ":0,"ஞ":0,"ட":0,"ண":0,"த":0,"ந":0,"ன":0,"ப":0,"ம":0,"ய":0,"ர":0,"ற":0,"ல":0,"ள":0,"ழ":0,"வ":0,"ஷ":0,"ஸ":0,"ஹ":0,"கா":0,"கி":0,"கீ":0,"கு":0,"கூ":0,"கெ":0,"கே":0,"கை":0,"கொ":0,"கோ":0,"கௌ":0,"க்":0,"ஙா":0,"ஙி":0,"ஙீ":0,"ஙு":0,"ஙூ":0,"ஙெ":0,"ஙே":0,"ஙை":0,"ஙொ":0,"

ஙோ":0,"ஙௌ":0,"ங்":0,"சா":0,"சி":0,"சீ":0,"சு":0,"சூ":0,"செ":0,"சே":0,"சை":0,"சொ":0,"சோ":0,"சௌ":0,"ச்":0,"ஜா":0,"ஜி":0,"ஜீ":0,"ஜு":0,"ஜூ":0,"ஜெ":0,"ஜே":0,"ஜை":0,"ஜொ":0,"ஜோ":0,"ஜௌ":0,"ஜ்":0,"ஞா":0,"ஞி":0,"ஞீ":0,"ஞு":0,"ஞூ":0,"ஞெ":0,"ஞே":0,"ஞை":0,"ஞொ":0,"ஞோ":0,"ஞௌ":0,"ஞ்":0,"டா":0,"டி":0,"டீ":0,"டு":0,"டூ":0,"டெ":0,"டே":0,"டை":0,"டொ":0,"டோ

":0,"டௌ":0,"ட்":0,"ணா":0,"ணி":0,"ணீ":0,"ணு":0,"ணூ":0,"ணெ":0,"ணே":0,"ணை":0,"ணொ":0,"ணோ":0,"ணௌ":0,"ண்":0,"தா":0,"தி":0,"தீ":0,"து":0,"தூ":0,"தெ":0,"தே":0,"தை":0,"தொ":0,"தோ":0,"தௌ":0,"த்":0,"நா":0,"நி":0,"நீ":0,"நு":0,"நூ":0,"நெ":0,"நே":0,"நை":0,"நொ":0,"நோ":0,"நௌ":0,"ந்":0,"னா":0,"னி":0,"னீ":0,"னு":0,"னூ":0,"னெ":0,"னே":0,"னை":0,"னொ

":0,"னோ":0,"னௌ":0,"ன்":0,"பா":0,"பி":0,"பீ":0,"பு":0,"பூ":0,"பெ":0,"பே":0,"பை":0,"பொ":0,"போ":0,"பௌ":0,"ப்":0,"மா":0,"மி":0,"மீ":0,"மு":0,"மூ":0,"மெ":0,"மே":0,"மை":0,"மொ":0,"மோ":0,"மௌ":0,"ம்":0,"யா":0,"யி":0,"யீ":0,"யு":0,"யூ":0,"யெ":0,"யே":0,"யை":0,"யொ":0,"யோ":0,"யௌ":0,"ய்":0,"ரா":0,"ரி":0,"ரீ":0,"ரு":0,"ரூ":0,"ரெ":0,"ரே":0,"ரை":0,"ரொ":0,"ரோ":0,

"ரௌ":0,"ர்":0,"றா":0,"றி":0,"றீ":0,"று":0,"றூ":0,"றெ":0,"றே":0,"றை":0,"றொ":0,"றோ":0,"றௌ":0,"ற்":0,"லா":0,"லி":0,"லீ":0,"லு":0,"லூ":0,"லெ":0,"லே":0,"லை":0,"லொ":0,"லோ":0,"லௌ":0,"ல்":0,"ளா":0,"ளி":0,"ளீ":0,"ளு":0,"ளூ":0,"ளெ":0,"ளே":0,"ளை":0,"ளொ":0,"ளோ":0,"ளௌ":0,"ள்":0,"ழா":0,"ழி":0,"ழீ":0,"ழு":0,"ழூ":0,"ழெ":0,"ழே":0,"ழை":0,"ழொ":0,"ழோ":0,"

ழௌ":0,"ழ்":0,"வா":0,"வி":0,"வீ":0,"வு":0,"வூ":0,"வெ":0,"வே":0,"வை":0,"வொ":0,"வோ":0,"வௌ":0,"வ்":0,"ஷா":0,"ஷி":0,"ஷீ":0,"ஷு":0,"ஷூ":0,"ஷெ":0,"ஷே":0,"ஷை":0,"ஷொ":0,"ஷோ":0,"ஷௌ":0,"ஷ்":0,"ஸா":0,"ஸி":0,"ஸீ":0,"ஸு":0,"ஸூ":0,"ஸெ":0,"ஸே":0,"ஸை":0,"ஸொ":0,"ஸோ":0,"ஸௌ":0,"ஸ்":0,"ஹா":0,"ஹி":0,"ஹீ":0,"ஹு":0,"ஹூ":0,"

ஹெ":0,"ஹே":0,"ஹை":0,"ஹொ":0,"ஹோ":0,"ஹௌ":0,"ஹ்":0};

var s = "ஆந்திரத்தை கண்டித்து தமிழகம் முழுவதும் பரவலாக ஆர்ப்பாட்டம் ";
function countTamil(s) {
for ( var i = 0; i < s.length; i++ ) {
	var c = s[i];
	var nextC = s[i+1];
	if((mei.indexOf(c) != -1) && (suffix.indexOf(s[i+1]) != -1)) {
		c += nextC;
		i++;
	}
	obj[c] += 1;
}

for(var letter in obj) {
  if(obj[letter]){
	console.log(letter + " : " + obj[letter]);
  }
}

}
</script>
